/**
 * File: UtilsCollect.java
 * Created by: mhaimel
 * Created on: Jul 1, 2011
 * CVS:  $Id: UtilsCollect.java 1.0 Jul 1, 2011 9:29:40 AM mhaimel Exp $
 */
package uk.ac.ebi.curtain.utils.concurrent;

import java.util.Map;
import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ConcurrentMap;

/**
 * @author mhaimel
 *
 */
public class UtilsCollect {
	
	public static <V> Queue<V> newQueue(){
		return new ConcurrentLinkedQueue<V>();
	}
	
	public static <K,V> ConcurrentMap<K,V> newConcurrentMap(){
		return new ConcurrentHashMap<K, V>();
//		return new NonBlockingHashMap<K, V>();
	}
	public static <K,V> ConcurrentMap<K,V> newConcurrentMap(ConcurrentMap<K,V> map){
		return new ConcurrentHashMap<K, V>();
	}
	public static <K,V> ConcurrentMap<K,V> newConcurrentMap(Map<K, V> input){
		return new ConcurrentHashMap<K, V>(input);
	}
}
